# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-zope-testrunner
pkgver=6.0
pkgrel=3
pkgdesc="Zope testrunner script"
arch=('any')
url="https://github.com/zopefoundation/zope.testrunner"
license=('ZPL')
depends=('python-setuptools' 'python-zope-interface' 'python-zope-exceptions')
checkdepends=('python-zope-testing')
source=("https://github.com/zopefoundation/zope.testrunner/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('5a778891b53f141876476303baa020a883190e30c0ef0a073e4b4a1fb1cf1a225900e8620254a4a5ee35a5412741f6eb28323322eee3e7c8b7c3ee96eabaf410')

build() {
  cd zope.testrunner-$pkgver
  python setup.py build
}

check() {
  cd zope.testrunner-$pkgver
  python -m venv "$srcdir/pyvenv" --system-site-packages
  (
    . "$srcdir/pyvenv/bin/activate"
    python setup.py develop
    python setup.py test
  )
}

package() {
  cd zope.testrunner-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
